cmake_minimum_required(VERSION 3.1)
cmake_policy(SET CMP0048 NEW)
project(udptrans VERSION 0.1.0.0)

# options
option(DEBUG "enable captive debug" ON)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wno-unused-but-set-variable -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-unused-function -Wno-unused-variable -lm")

# include aux cmake scripts
include("Gengetopt.cmake")
ADD_GENGETOPT_FILES(CMDLINE cmdline.ggo)

include_directories("${CMAKE_CURRENT_BINARY_DIR}"
	"${PROJECT_BINARY_DIR}"
	)

set(UDPTRANS
main.c
arg.c
)

# target
add_executable(udptrans ${CMDLINE} ${UDPTRANS})

# install
install(TARGETS udptrans DESTINATION bin)
